package org.Java2D;

import javax.swing.JFrame;

import pasantias.Dominio.BoardBuilder;
import pasantias.Dominio.Circle;
import pasantias.Dominio.Dot;
import pasantias.Dominio.InmutableBoard;
import pasantias.Dominio.Rectangle;
import pasantias.Dominio.Square;

public class Main {

	public static void main(String[] args) {
		JFrame mainFrame = new JFrame("Graphics demo");
		Canvas canvas = new Canvas();
		BoardBuilder boardBuilder = new BoardBuilder(100, 70);
		boardBuilder.addFigure(new Circle(new Dot(7, 7), 5)).addFigure(new Dot(30, 30)).addFigure(new Square(new Dot(32, 5), 20)).addFigure(new Rectangle(new Dot(70, 15), 10, 20));
		InmutableBoard board = boardBuilder.build();
		board.draw(canvas);

		mainFrame.getContentPane().add(canvas);
		mainFrame.pack();
		mainFrame.setVisible(true);

		

	}

}
